import request from '/@/utils/request';

export function pageList(query?: Object) {
    return request({
        url: '/admin/grade/page',
        method: 'get',
        params: query,
    });
}

export function listAll(query?: Object) {
    return request({
        url: '/admin/grade/list',
        method: 'get',
        params: query,
    });
}



export function delObj(ids?: object) {
    return request({
        url: '/admin/grade',
        method: 'delete',
        data: ids,
    });
}

export function getObj(id: string){
    return request({
        url: '/admin/grade/details/'+id,
        method: 'get'
    })
}

export const addObj = (obj: Object) => {
    return request({
        url: '/admin/grade',
        method: 'post',
        data: obj,
    });
};

export const putObj = (obj: Object) => {
    return request({
        url: '/admin/grade',
        method: 'put',
        data: obj,
    });
};